<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>relative 相对定位</title>
    <style>
      * {
        padding: 0px;
        margin: 0px;
      }

      .box1 {
        width: 100%;
        height: 400px;
        background-color: burlywood;
      }
      .box2 {
        width: 50%;
        height: 50%;
        background-color: coral;
        position: relative;
        left: 10px;
        top: 10px;
      }
    </style>
  </head>
  <body>
    <p>
      relative（相对定位）：生成相对定位的元素，通过top,bottom,left,right的设置相对于其正常（原先本身）位置进行定位。可通过z-index进行层次分级。　　
    </p>
    <div class="box1">
      <div class="box2"></div>
    </div>
  </body>
</html>
